﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditDB_old.aspx.cs" Inherits="admin_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Content/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateEditButton="True" CellPadding="4" DataKeyNames="id" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" Height="50px" CssClass="gridview" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" />
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" />
                <asp:BoundField DataField="category" HeaderText="category" SortExpression="category" />
                <asp:BoundField DataField="title" HeaderText="title" SortExpression="title" />
                <asp:BoundField DataField="latin_title" HeaderText="latin_title" SortExpression="latin_title" />
                <asp:BoundField DataField="swf" HeaderText="swf" SortExpression="swf" />
                <asp:BoundField DataField="thumbnail" HeaderText="thumbnail" SortExpression="thumbnail" />
                <asp:BoundField DataField="large_img" HeaderText="large_img" SortExpression="large_img" />
                <asp:BoundField DataField="added" HeaderText="added" SortExpression="added" />
                <asp:CheckBoxField DataField="active" HeaderText="active" SortExpression="active" />
                <asp:BoundField DataField="plays_total" HeaderText="plays_total" SortExpression="plays_total" />
                <asp:BoundField DataField="plays_today" HeaderText="plays_today" SortExpression="plays_today" />
                <asp:BoundField DataField="keywords" HeaderText="keywords" SortExpression="keywords" />
                <asp:BoundField DataField="description" HeaderText="description" SortExpression="description" />
                <asp:BoundField DataField="controls" HeaderText="controls" SortExpression="controls" />
                <asp:BoundField DataField="height" HeaderText="height" SortExpression="height" />
                <asp:BoundField DataField="width" HeaderText="width" SortExpression="width" />
                <asp:BoundField DataField="votes" HeaderText="votes" SortExpression="votes" />
                <asp:BoundField DataField="votes_value" HeaderText="votes_value" SortExpression="votes_value" />
                <asp:BoundField DataField="rating" HeaderText="rating" SortExpression="rating" />
                <asp:CheckBoxField DataField="featured" HeaderText="featured" SortExpression="featured" />
                <asp:BoundField DataField="game_tag" HeaderText="game_tag" SortExpression="game_tag" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" Height="50px" CssClass="gridview" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gamesConnectionString %>" SelectCommand="SELECT * FROM [Game]" DeleteCommand="DELETE FROM [Game] WHERE [id] = @id" InsertCommand="INSERT INTO [Game] ([category], [title], [latin_title], [swf], [thumbnail], [large_img], [added], [active], [plays_total], [plays_today], [keywords], [description], [controls], [height], [width], [votes], [votes_value], [rating], [featured], [game_tag]) VALUES (@category, @title, @latin_title, @swf, @thumbnail, @large_img, @added, @active, @plays_total, @plays_today, @keywords, @description, @controls, @height, @width, @votes, @votes_value, @rating, @featured, @game_tag)" UpdateCommand="UPDATE [Game] SET [category] = @category, [title] = @title, [latin_title] = @latin_title, [swf] = @swf, [thumbnail] = @thumbnail, [large_img] = @large_img, [added] = @added, [active] = @active, [plays_total] = @plays_total, [plays_today] = @plays_today, [keywords] = @keywords, [description] = @description, [controls] = @controls, [height] = @height, [width] = @width, [votes] = @votes, [votes_value] = @votes_value, [rating] = @rating, [featured] = @featured, [game_tag] = @game_tag WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="category" Type="String" />
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="latin_title" Type="String" />
                <asp:Parameter Name="swf" Type="String" />
                <asp:Parameter Name="thumbnail" Type="String" />
                <asp:Parameter Name="large_img" Type="String" />
                <asp:Parameter Name="added" Type="DateTime" />
                <asp:Parameter Name="active" Type="Boolean" />
                <asp:Parameter Name="plays_total" Type="Int64" />
                <asp:Parameter Name="plays_today" Type="Int32" />
                <asp:Parameter Name="keywords" Type="String" />
                <asp:Parameter Name="description" Type="String" />
                <asp:Parameter Name="controls" Type="String" />
                <asp:Parameter Name="height" Type="Int32" />
                <asp:Parameter Name="width" Type="Int32" />
                <asp:Parameter Name="votes" Type="Int32" />
                <asp:Parameter Name="votes_value" Type="Int32" />
                <asp:Parameter Name="rating" Type="Int32" />
                <asp:Parameter Name="featured" Type="Boolean" />
                <asp:Parameter Name="game_tag" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="category" Type="String" />
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="latin_title" Type="String" />
                <asp:Parameter Name="swf" Type="String" />
                <asp:Parameter Name="thumbnail" Type="String" />
                <asp:Parameter Name="large_img" Type="String" />
                <asp:Parameter Name="added" Type="DateTime" />
                <asp:Parameter Name="active" Type="Boolean" />
                <asp:Parameter Name="plays_total" Type="Int64" />
                <asp:Parameter Name="plays_today" Type="Int32" />
                <asp:Parameter Name="keywords" Type="String" />
                <asp:Parameter Name="description" Type="String" />
                <asp:Parameter Name="controls" Type="String" />
                <asp:Parameter Name="height" Type="Int32" />
                <asp:Parameter Name="width" Type="Int32" />
                <asp:Parameter Name="votes" Type="Int32" />
                <asp:Parameter Name="votes_value" Type="Int32" />
                <asp:Parameter Name="rating" Type="Int32" />
                <asp:Parameter Name="featured" Type="Boolean" />
                <asp:Parameter Name="game_tag" Type="String" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>
